import java.util.Arrays;

public class Test {
    public static void main(String[] args) {
        String str = "hello abc world";
        String ret = str.replace(" ","");
        System.out.println(ret);
    }

    public static void main10(String[] args) {
        String str = "abababcdefav";
        String ret = str.replace("a","OOOOOOOOO");
        System.out.println(ret);
    }

    public static void main9(String[] args) {
        String s1 = "hello";
        char[] array = s1.toCharArray();
        System.out.println(Arrays.toString(array));

        char[] array2 = {'a','b','c','d'};
        String s2 = Arrays.toString(array2);
        String s3 = new String(array2);
        System.out.println(s2);
        System.out.println(s3);

    }

    public static void main8(String[] args) {
        String s1 = "hello";
        String ret = s1.toUpperCase();
        System.out.println(ret);
        String ret2 = ret.toLowerCase();
        System.out.println(ret2);
    }

    public static void main7(String[] args) {
        int data1 = Integer.parseInt("1234");
        System.out.println(data1);
        double data2 = Double.parseDouble("123.1213");
        System.out.println(data2);
    }

    public static void main6(String[] args) {
        String s = String.valueOf(19.9);
        System.out.println(s);
        String s1 = String.valueOf(1234567);
        System.out.println(s1);
    }

    public static void main5(String[] args) {
        String s1 = "Hello";
        System.out.println(s1.charAt(0));
        System.out.println(s1.charAt(1));
        for (int i = 0; i < s1.length(); i++) {
            System.out.println(s1.charAt(i));
        }

        int index = s1.indexOf('l',4);
        System.out.println(index);
        int index1 = s1.lastIndexOf("l");
        System.out.println(index1);
    }

    public static void main4(String[] args) {
        String s1 = "Hello";
        String s2 = "hello";
        System.out.println(s1.compareTo(s2));
        System.out.println(s1.compareToIgnoreCase(s2));
    }

    public static void main3(String[] args) {
        String s1 = "hello";
        String s2 = "hello";
        System.out.println(s1==s2);

        String s3 = new String("hello");
        String s4 = new String("helle");
        System.out.println(s3==s4);
        System.out.println(s3.equals(s4));
        System.out.println(s3.compareTo(s4));
    }

    public static void main2(String[] args) {
        String str1 = new String("hello");
        String str3 = str1;

        System.out.println(str3);;
        System.out.println(str1);

        String str4 = "";
        String str5 = null;
        System.out.println(str4);
        System.out.println(str5);
    }


    public static void main1(String[] args) {
        String str = "hello";
        System.out.println(str);

        String str2 = new String();
        System.out.println(str2);

        String str3 = new String("abcd");
        System.out.println(str3);


    }


}
